package 设计模式.h_组合模式;

/**
 * 
 * 组合模式：现了对单个对象和组合对象的一致性处理
 * 
 * @author caihe
 * @date 2023/3/10 11:36
 */
public class Test {
    public static void main(String[] args) {
        
        EduComposite university = new University("湖商大学（手动狗头）");
        College computeCollege = new College("计算机学院", "牛掰");
        College artCollege = new College("艺术学院", "美丽");
        
        computeCollege.print();

        university.add(computeCollege);
        university.add(computeCollege, artCollege);
        university.print();
        


    }
}
